package com.gok.seasonmovie.service;

import com.gok.seasonmovie.entity.Booking;
import com.gok.seasonmovie.entity.Movie;
import com.gok.seasonmovie.mapper.BookingMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class BookingService {
    @Autowired
    private BookingMapper bookingMapper;

//    public List<Booking> findByCid(String cid){
//        return bookingMapper.findByCid(cid);
//    }

    public List<Movie> getMovieById(String id){
        return bookingMapper.getMovieById(id);
    }

    public List<Booking> getBookingByCidAndMid(String cid,String mid){
        return bookingMapper.getBookingByCidAndMid(cid,mid);
    }

    public void insertOrder(String cname,String murl,String seat,String hall,double price,String mname,String day,String time,String state,int num){ bookingMapper.insertOrder(cname,murl,seat,hall,price,mname,day,time,state,num);}

}
